cmake_minimum_required(VERSION 3.10)
project(dlms_ex CXX C)

set(C_COMPILE_OPTIONS "-std=c99")

# 添加C++语言编译选项
set(CXX_COMPILE_OPTIONS "-std=c++11")


add_subdirectory(lib/dlms)
include_directories(lib/dlms/include)
add_subdirectory(lib/serial)
include_directories(lib/serial/include)

add_library(ee ee.c)
add_library(dlmsWrap dlmsWrap.c)

target_link_libraries(dlmsWrap  dlms)

add_executable(dlms_test main.cpp )
target_link_libraries(dlms_test  dlms sdkserial ee dlmsWrap)